
var roomName = null;
var useDate = null;
var useTime = null;
var chooseTime =null;
var theme = null
var abstracts = null;
var commitBtn = null;
var saveBtn = null;
var backBtn = null;


$(function(){
	roomName = $("#roomid");
	useDate = $("#usedate");
	useTime = $("#useTime");
	chooseTime = $("#chooseTime ");
	theme = $("#theme");
	abstracts = $("#abstracts");
	saveBtn = $("#save")
	commitBtn = $("#commit");
	backBtn = $("#back");
	//初始化的时候，要把所有的提示信息变为：* 以提示必填项，更灵活，不要写在页面上
	roomName.next().html("*");
	useDate.next().html("*");
	useTime.next().html("*")
	theme.next().html("*");
	abstracts.next().html("*");

	saveBtn.bind("click",function(){

		if (confirm("是否确认保存数据")) {
			$("#status").val('1')
			$("#meetingForm").submit();
		}


	});

	commitBtn.bind("click",function(){

		if (confirm("是否确认提交数据")) {
			$("#status").val('2')
			$("#meetingForm").submit();
		}


	});

	backBtn.on("click",function(){
		if(referer != undefined
			&& null != referer
			&& "" != referer
			&& "null" != referer
			&& referer.length > 4){
		 window.location.href = referer;
		}else{
			history.back(-1);
		}
	});
});